@import "mixin_helpers";
@import "_arrow";

@include arrow-box($selector: ".formError", $box_color: #202020, $border_width: 1px, $arrow_size: 7px, $centered: false, $edge: 7px, $position: "bottom");

.formError {
  z-index: 990;
  background: transparent;
  border: none;
  .formErrorContent {
    z-index: 991;
  }
  .formErrorArrow {
    z-index: 996;
    display: none;
  }
}

.ui-dialog .formError {
  z-index: 5000;
  .formErrorContent {
    z-index: 5001;
  }
  .formErrorArrow {
    z-index: 5006;
  }
}

.inputContainer {
  position: relative;
  float: left;
}

.formError {
  position: absolute;
  top: 300px;
  left: 300px;
  display: block;
  cursor: pointer;
  text-align: left;
  &.inline {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
  }
}

.ajaxSubmit {
  padding: 20px;
  background: #55ea55;
  border: 1px solid #999;
  display: none;
}

.formError {
  .formErrorContent {
    width: 100%;
    background: #202020;
    position: relative;
    color: #fff;
    min-width: 120px;
    font-size: 11px;
    padding: 4px 10px 4px 10px;
    @include border-radius(6px);
  }
  &.inline .formErrorContent {
    @include box-shadow(none);
    border: none;
    @include border-radius(0);
  }
}

.greenPopup .formErrorContent {
  background: #33be40;
}

.blackPopup .formErrorContent {
  background: #393939;
  color: #FFF;
}

.formError .formErrorArrow {
  width: 15px;
  margin: -2px 0 0 13px;
  position: relative;
}

body {
  &[dir='rtl'] .formError .formErrorArrow, &.rtl .formError .formErrorArrow {
    margin: -2px 13px 0 0;
  }
}

.formError {
  .formErrorArrowBottom {
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    -o-box-shadow: none;
    margin: 0px 0 0 12px;
    top: 2px;
  }
  .formErrorArrow div {
    border-left: 2px solid #ddd;
    border-right: 2px solid #ddd;
    box-shadow: 0 2px 3px #444;
    -moz-box-shadow: 0 2px 3px #444;
    -webkit-box-shadow: 0 2px 3px #444;
    -o-box-shadow: 0 2px 3px #444;
    font-size: 0px;
    height: 1px;
    background: #ee0101;
    margin: 0 auto;
    line-height: 0;
    font-size: 0;
    display: block;
  }
  .formErrorArrowBottom div {
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    -o-box-shadow: none;
  }
}

.greenPopup .formErrorArrow div {
  background: #33be40;
}

.blackPopup .formErrorArrow div {
  background: #393939;
  color: #FFF;
}

.formError .formErrorArrow {
  .line10 {
    width: 15px;
    border: none;
  }
  .line9 {
    width: 13px;
    border: none;
  }
  .line8 {
    width: 11px;
  }
  .line7 {
    width: 9px;
  }
  .line6 {
    width: 7px;
  }
  .line5 {
    width: 5px;
  }
  .line4 {
    width: 3px;
  }
  .line3 {
    width: 1px;
    border-left: 2px solid #ddd;
    border-right: 2px solid #ddd;
    border-bottom: 0 solid #ddd;
  }
  .line2 {
    width: 3px;
    border: none;
    background: #ddd;
  }
  .line1 {
    width: 1px;
    border: none;
    background: #ddd;
  }
}